package club.cearnach.api.service;

import club.cearnach.api.dto.PersonDTO;
import club.cearnach.entity.Person;
import club.cearnach.api.exception.MoviePathException;
import club.cearnach.api.exception.PersonException;
import club.cearnach.api.form.PageBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.io.IOException;
import java.util.List;

/**
 * @author 阮胜
 * @date 2018/5/12 17:04
 */
public interface IPersonService {

    Page<Person> findAll(Pageable pageable);

    Person save(PersonDTO personDTO) throws PersonException, IOException, MoviePathException;

    List<Person> findByName(String name);

    Person findByNameOne(String name);

    Person findById(Integer id) throws PersonException;

    void delete(Integer id) throws PersonException;

    Page<Person> findAllOrderByCreateDate(PageBean pageBean);

    long deleteIn(Integer[] idArr);

    long count();


}
